package net.aetherial.context.grounding;

import net.aetherial.context.grounding.analyzers.*;
import net.aetherial.context.grounding.annotators.*;
import net.aetherial.context.grounding.estimators.*;
import net.aetherial.context.grounding.gatherers.*;
import net.aetherial.context.grounding.loggers.*;

/**
 * Main class for setting up and running analyses.
 */

public class Main 
{
	public static void main (String[] args)
	{
		// Gatherer g = new IrcGatherer ();
		Gatherer g = new XmlGatherer ();

		AnnotatingAnalyzer a = new AnnotatingAnalyzer ();
		g.setAnalyzer (a);
		
		// SimpleAnalyzer a = new SimpleAnalyzer ();
		// g.setAnalyzer (a);
		// a.setEstimator (new TurnCountEstimator ());
		
		// WordNetAnnotator wn = new WordNetAnnotator ();
		// a.addAnnotator (wn);

		PunctuationStrippingAnnotator pn = new PunctuationStrippingAnnotator ();
		a.addAnnotator (pn);

		// RegressionEstimator e = new RegressionEstimator ();
		// e.addEstimator (new ConversationalAlignmentEstimator ());
		// e.addEstimator (new PronounEstimator ());
		// e.addEstimator (new TurnCountEstimator ());
		// e.addEstimator (new PositiveFeedbackEstimator ());
		// e.addEstimator (new ClarificationEstimator ());
		// a.setEstimator (e);
		
		
		LinearModelEstimator le = new LinearModelEstimator ();
		le.setIntercept (-0.164);
		le.addEstimatorWithCoefficient (new PositiveFeedbackEstimator (), 2.104);
		le.addEstimatorWithCoefficient (new ClarificationEstimator (), 1.402);
		a.setEstimator (le);

		// LinearModelEstimator le = new LinearModelEstimator ();
		// le.setIntercept (-0.3802);
		// le.addEstimatorWithCoefficient (new TurnCountEstimator (), 0.2974);
		// a.setEstimator (le);

		
		Logger l = new Logger ();
		
		a.setLogger (l);
		
		Thread t = new Thread (g);
		
		System.out.print ("Starting thread... ");
		t.start ();
		System.out.println ("Done.");
	}
}
